<script type="text/javascript">
	function showExportConfirm()
	{
		document.getElementById('confirmExportDiv').style.display = 'block';
	}
</script>

<form class="form-horizontal" role="form" method="post" action="#">    
  <div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">Mã khách hàng</label>
    <div class="col-sm-10">
      <?=!empty($maker_code) ? $maker_code : "" ?>
    </div>
  </div>      
</form>



<!-- Danh sách code giống -->
<?php 
	if(!empty($matched_export_array))
	{
?>
<h2>Sản phẩm tồn tại trong kho</h2>
<form class="form-horizontal" role="form" method="post" action="<?=site_url('exportw/printExport/'.$export_form_id) ?>">    
<div class="table-responsive">
	<table class="table table-bordered">
		<thead>
			<tr class="success">
				<th>Sản phẩm</th>
				<th>Mã</th>
				<th>Màu</th>
				<th>Size</th>				
				<th>Kho</th>
			</tr>
		</thead>
		<tbody>
			<?php 
				$i = 1;
				foreach ($matched_export_array as $key => $value):					
			?>
			<tr>
				<td><?=$value['title'] ?></td>
				<td><?=$value['code'] ?></td>
				<td><?=$value['color'] ?></td>
				<td><?=$value['size'] ?></td>				
				<td><?=$value['storage'] ?></td>				
				<input type="hidden" name="storage_product<?=$i ?>" value="<?=$value['storagePID'] ?>">
				<input type="hidden" name="storage<?=$i ?>" value="<?=$value['storage_id'] ?>">
			</tr>
			<?php 
				$i++;
				endforeach;
			?>
		</tbody>
	</table>
</div>
<p>
	<button type="submit" name="exportConfirmBtn" value="add-all" class="btn btn-primary" onclick="showExportConfirm()">In phiếu xuất kho</button>
</p>	
</form>
<?php
	}
?>

<form class="form-horizontal" role="form" method="post" action="<?=site_url('exportw/confirmExport/'.$export_form_id) ?>">    
  <div class="form-group" id="confirmExportDiv" style="display:none;">    
    <div class="col-sm-10">
      <button type="submit" name="exportConfirmBtn" value="add-all" class="btn btn-primary">Xuất kho</button>
    </div>
  </div>      
</form>

<!-- Danh sách code không giống -->
<?php 
	if(!empty($unmatched_export_array))
	{
?>
<h2>Sản phẩm không tồn tại trong kho</h2>
<div class="table-responsive">
	<table class="table table-bordered">
		<thead>
			<tr class="success">
				<th>Mã</th>								
			</tr>
		</thead>
		<tbody>
			<?php 
				foreach ($unmatched_export_array as $key => $value):					
			?>
			<tr>
				<td><?=$value ?></td>				
			</tr>
			<?php 
				endforeach;
			?>
		</tbody>
	</table>
</div>	
<?php
	}
?>

